package com.uubx.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * (Role)实体类
 *
 * @author makejava
 * @since 2020-12-29 17:38:37
 */
@ApiModel(description = "Role数据")
public class Role implements Serializable {
    private static final long serialVersionUID = 749105194824958708L;
    @Id
    private Integer id;
    /**
     * 角色名称
     */        @ApiModelProperty("角色名称")
    private String roleName;
    /**
     * 角色描述
     */        @ApiModelProperty("角色描述")
    private String description;
    /**
     * 状态：1有效；2删除
     */        @ApiModelProperty("状态：0未启用; 1已启用")
    private Integer status;
    /**
     * 创建时间
     */        @ApiModelProperty("创建时间")
    private Date createTime;
    /**
     * 更新时间
     */        @ApiModelProperty("更新时间")
    private Date updateTime;

    public Role() {
    }

    public Role(Integer id, String roleName, String description, Integer status, Date createTime, Date updateTime) {
        this.id = id;
        this.roleName = roleName;
        this.description = description;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Role{" +
                "id=" + id +
                ", roleName='" + roleName + '\'' +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
